/**
 * Add event to one object
 */
ihelpuoo.event.add = function(obj,eventName,fnHandler,bCapture)
{
	if(isIE)
		obj.attachEvent("on"+eventName,fnHandler);
	else
		obj.addEventListener(eventName, fnHandler, bCapture);
}

/**
 * Remove event from one object
 */
ihelpuoo.event.remove = function(obj,eventName,fnHandler,bCapture)
{
	if(isIE)
		obj.attachEvent("on"+eventName,fnHandler);
	else
		obj.removeEventListener(eventName, fnHandler, bCapture);
}

ihelpuoo.event.srcElement = function(obj)
{
	if(obj && obj.tagName) return obj;
	return window.event.srcElement;
}

ihelpuoo.Event = function(args)
{
	if(isIE)
		return window.event;
	else if(args.length==0)
		return null;
	return args[0]
}

ihelpuoo.event.cancelBubble = function(event)
{
	if(isIE)
		window.event.cancelBubble = true;
	else if(event)
		event.cancelBubble = true;
}

ihelpuoo.event.isEnter = function(event)
{
	return 13 == event.keyCode;
}